﻿/*************************************************   
'* 模組: HTMLEditor
'* 作者: Adams <adams@netdb.com.com>
'* 修改: 2013-3-28
'* 目的: 設計網頁編輯器HTMLEditor模組
'* 參數: 
'* 註解: ASP.NET 3.5 以上網頁上專用HTML編輯器(使用AJAX模型設計)
'*************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Obout.Ajax.UI.HTMLEditor;

public partial class ucHtmlEditor : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    /// <summary>
    /// 編輯器文字內容
    /// </summary>
    public string Text
    {
        get
        {            
            return editor.EditPanel.Content;
        }
        set
        {
            editor.EditPanel.Content = value;
        }
    }

    /// <summary>
    /// 是否顯示設計模式切換按鈕
    /// </summary>
    public bool ShowDesignButton
    {
        get
        {
            return editor.BottomToolbar.ShowDesignButton;
        }
        set
        {
            editor.BottomToolbar.ShowDesignButton = value;
        }        
    }

    /// <summary>
    /// 是否顯示HTML模式切換按鈕
    /// </summary>
    public bool ShowHtmlTextButton
    {
        get
        {
            return editor.BottomToolbar.ShowHtmlTextButton;
        }
        set
        {
            editor.BottomToolbar.ShowHtmlTextButton = value;
        }        
    }
    /// <summary>
    /// 是否顯示預覽模式切換按鈕
    /// </summary>
    public bool ShowPreviewButton
    {
        get
        {
            return editor.BottomToolbar.ShowPreviewButton;
        }
        set
        {
            editor.BottomToolbar.ShowPreviewButton = value;
        }        
    }


    /// <summary>
    /// HTMLEditor編輯器的執行模式
    /// </summary>
    public ActiveModeType ActiveModeType
    {
        get
        {
            return editor.EditPanel.ActiveMode;
        }
        set
        {
            editor.EditPanel.ActiveMode = value;
        }
    }
    /// <summary>
    /// vicky 20130614
    /// </summary>
    public string editor_ID
    {
        get
        {
            return editor.ClientID;
        }

    }
}